home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 April
/
EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso
/
EARCD
/
biz
/
demo
/
Reflections4De.lha
/
Ref4Demo
/
skripte.lha
/
pyramid.skr
< prev
next >
Wrap
Text File
|
1996-07-26
|
1KB
|
53 lines
REFSKRIPT
GET_XY Pyramide Breite Höhe
RETURN_IF_ABBRUCH 1
GET_RESULT res
COPY_WORD res 1
GET_RESULT breite
COPY_WORD res 2
GET_RESULT hoehe
; Dreiecks-Objekt erzeugen */
OBJ_NEW pyramide 3
GET_RESULT pyr
DIV breite 2
GET_RESULT brhalb
MUL brhalb -1
GET_RESULT brhalb_min
; 4 punkte der grundseite und 1 Punkt für spitze erzeugen
; 1.Pkt
GEO_NEW_PT pyr
GET_RESULT p1
GEO_SET_PT pyr p1 brhalb_min brhalb_min 0
; 2.Pkt
GEO_NEW_PT pyr
GET_RESULT p2
GEO_SET_PT pyr p2 brhalb brhalb_min 0
; 3.Pkt
GEO_NEW_PT pyr
GET_RESULT p3
GEO_SET_PT pyr p3 brhalb brhalb 0
; 4.Pkt
GEO_NEW_PT pyr
GET_RESULT p4
GEO_SET_PT pyr p4 brhalb_min brhalb 0
; 5.Pkt
GEO_NEW_PT pyr
GET_RESULT p5
GEO_SET_PT pyr p5 0 0 hoehe
; Jetzt die Dreiecke erzeugen
; Grundfläche
DREI_NEW_DREI pyr p1 p3 p2
DREI_NEW_DREI pyr p1 p4 p3
; Jetzt 4 seitenflächen
DREI_NEW_DREI pyr p1 p2 p5
DREI_NEW_DREI pyr p2 p3 p5
DREI_NEW_DREI pyr p3 p4 p5
DREI_NEW_DREI pyr p4 p1 p5
PKL_ADD pyr
ZENTRIEREN pyr
PLOT_PKL
RETURN 1